<template>
  <BasicTabs v-model="tabname" :tabs="tabs" @tabChange="tabsChange"> </BasicTabs>
</template>

<script setup lang="ts">
  import { TabPaneItem } from '@/components/ui/basic-tabs/types'
  import ChangeMethod from './components/changeMethod.vue'
  import WorkforceManagement from './components/workforceManagement.vue'

  const tabname = ref()
  const tabs = shallowRef<TabPaneItem[]>([
    {
      name: '14110',
      label: '换班方式',
      roles: ['14110'],
      isFit: true,
      slots: { default: h(ChangeMethod) }
    },
    {
      name: '14120',
      label: '排班管理',
      roles: ['14120'],
      slots: { default: h(WorkforceManagement) }
    }
  ])

  const tabsChange = (tab) => {
    console.log(tab)
  }
</script>
